<?php
html::printPath(array(
    'programType.form-title' => '/admin/programType/all',
    $programType['name'] => '/admin/programType/display?code=' . $programType['code'],
    sql::isPersistent($programTypeL10n) ? 'application.editThisL10n' : 'application.createNewL10n' => ''
));
$msg->printMessages();

if (sql::isPersistent($programTypeL10n)) {
    echo '<ul class="commandList">';
    echo '<li class="deleteLi">' . html::anchor('admin/programType/deleteLocalizedValues?program_type_code=' . $programType['code'] . '&language_code=' . $programTypeL10n['language_code'], text::get('application.deleteThisL10n'), array('onclick'=>'return confirmDeletion()')) . '</li>';
    echo '</ul>';
}

$fb = new FormBuilder('programType', $programTypeL10n);
$fb->setAction('/admin/programType/saveLocalizedValues');
$fb->text('program_type_code')->readOnly();
$fb->comboBox('language_code', $languageOptions)->required()->readOnly(sql::isPersistent($programTypeL10n));
$fb->text('name')->required();
$fb->textarea('description')->required();
$fb->submitButton();
$fb->write();
